const express = require('express')
const app = express()

app.get('/login', (req, res, next) => {
  // 传统方式
  // res.type("application/json")
  // res.end(JSON.stringify({
  //   name: "why"
  // }))
  //  The "chunk" argument must be of type string or an instance of Buffer
  res.status(204)
  res.json({
    name: 'why',
    age: 18
  })
})
app.listen(8000, () => {
  console.log('服务器启动成功')
})